select no,title,wirte,date,count from news_board;
drop table final_member
create table final_member(
 id varchar2(50) primary key,
 password varchar2(50) not null,
 name varchar2(50) not null,
 email varchar2(300) not null,
 point number default 1000,
 grade number default 5    
)
insert into final_member(id,password,name,email) values('java','1234','꼐꼐','like6547@naver.com');
select * from final_member;

drop table news_board

create table javabox_member(
 id varchar2(50) primary key,
 password varchar2(50) not null,
 name varchar2(50) not null,
 email varchar2(300) not null,
 point number default 1000,
 grade number default 5    
)

drop table javabox_member;

select id,password,name,email,point,grade 
from JAVABOX_MEMBER;


insert into JAVABOX_MEMBER values('java','1234','자바','java@gmail.com',1000,5);

insert into JAVABOX_MEMBER values('test','1234','ajax','ajax@gmail.com',1000,5);


drop table news_board;

create table news_board(
	 no number primary key,
 	title varchar2(50) not null,
 	content varchar2(4000) not null,
 	writedate date,
 	count number default 0,
 	category varchar2(50) not null,
	 id varchar2(50) not null
)
insert into news_board(no,title,content,writedate,category,id) values(news_board_seq.nextval,'test','test',sysdate,'test','java');
select * from news_board;
create sequence news_board_seq nocache;
drop sequence news_board_seq
SELECT no,title,write_date,count,id FROM(	 
	SELECT no,title,write_date,count,id,CEIL(rownum/5) AS page FROM ( 
		SELECT no,title,count,id,to_char(writedate,'YYYY.MM.DD') as write_date FROM news_board
			order by write_date desc) 
    ) WHERE PAGE='1';
    
    SELECT no,title,count,id,to_char(writedate,'YYYY.MM.DD') as writedate FROM news_board where
    title like '%te%' order by no desc
    
   

